const express = require('express')
const server = express()
const router = require('./router')
const cors = require('cors')

server.use(cors()) // 解决跨域
server.use(express.urlencoded({extended:false})) // 解析req.body数据
server.use('/API',router)  // 使用路由模块
server.listen(8080,()=>{
    console.log('server running at http://localhost:8080/');
})